home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
LOCATE-1.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-08-31
|
783b
|
28 lines
' LOCATE-1.BAS
' This program demonstrates the LOCATE statement.
CLS
INPUT "Please enter the row coordinate (1-24): ", rowNum%
PRINT
INPUT "Please enter the column coordinate (1-80): ", colNum%
PRINT
INPUT "Please enter a message to display: ", message$
CLS
FOR i% = 0 TO 70 STEP 10 ' print column coordinates across
PRINT "1234567890"; ' the top of the screen
NEXT i%
FOR i% = 2 TO 23 ' print the row numbers along the
LOCATE i%, 1 ' left-hand side of the screen
PRINT LTRIM$(STR$(i%)) ' don't print the blank space
NEXT i% ' before each number
LOCATE rowNum%, colNum% ' print the message at the user-
PRINT message$ ' supplied coordinates